﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpModel.h"
#include "DbDataSchema.h"
#include "IElementShapeHandleBehavior.h"

namespace gcmp
{
    

    class GCMP_MODEL_EXPORT IGripPointsShapeHandleBehavior : public IElementShapeHandleBehavior
    {
        DEFINE_CAST_DERIVED(gcmp::IGripPointsShapeHandleBehavior, gcmp::IElementShapeHandleBehavior)
    public:

        /// \brief 生成GripPointBehavior作为默认的GripPointsShapeHandleBehavior
        /// 
        /// \param pDocument 所属文档
        /// \param modelViewId 显示夹点的ModelView的ElementId(切换视图夹点会刷新)
        /// \return GripPointBehavior
        static OwnerPtr<IGripPointsShapeHandleBehavior> CreateGripPointsHandleBehavior(IDocument* pDocument, const ElementId& modelViewId);

        /// \brief 生成InstanceMovableGripPointBehavior作为默认的GripPointsShapeHandleBehavior
        /// 
        /// \param pDocument 所属文档
        /// \param modelViewId 显示夹点的ModelView的ElementId(切换视图夹点会刷新)
        /// \return InstanceMovableGripPointBehavior
        static OwnerPtr<IGripPointsShapeHandleBehavior> CreateInstanceMovableGripPointsHandleBehavior(IDocument* pDocument, const ElementId& modelViewId);

        /// \brief 获取在拖动夹点时优先获取的捕捉类型（一般优先捕捉相同类型）
        /// 
        /// \return 在拖动夹点时优先获取的捕捉类型
        virtual const std::vector<Int64>& GetSnapPriorityTypes() const = 0;

    };
}

